﻿//////////////////////////////////////////////////////////////////////////////
//
//  Copyright © 1998-2024 Glodon Company Limited.  All rights reserved.
//
//  Use of this software is subject to the terms of the Glodon license
//  agreement provided at the time of installation or download, or which
//  otherwise accompanies this software in either electronic or hard copy form.  
//
//////////////////////////////////////////////////////////////////////////////

#pragma once

#include "GcmpModelInterface.h"
#include "IObject.h"
#include "NotificationTypes_gen.h"
#include "INotificationDetailItem.h"

namespace gcmp
{
    class INotification;
    class INotificationEvent;

    /// \brief 弱提示管理器的接口类
    ///
    /// 提供了创建提示、获取提示、获取提示事件等接口
    class INotificationManager : public IObject
    {
        DEFINE_CAST_DERIVED(gcmp::INotificationManager, gcmp::IObject);
    public:

        /// \brief 获取INotificationManager对象
        /// \return 返回INotificationManager对象
        GCMP_MODEL_INTERFACE_EXPORT static INotificationManager* Get();

        /// \brief 添加弱提示对象至管理器
        /// \param notification     给定的弱提示对象指针
        /// \return 添加的弱提示对象指针 改成void？
        virtual const bool AddNotification(OwnerPtr<INotification> notification) = 0;

        /// \brief 获取弱提示的数量
        /// \return 返回弱提示的数量
        virtual size_t GetNotificationCount() const = 0;

        /// \brief 根据索引获取弱提示
        /// \param index         目标弱提示的索引，必须小于弱提示的数量
        /// \return 返回索引对应的弱提示
        virtual const INotification* GetNotificationByIndex(size_t index) const = 0;

        /// \brief 获取弱提示事件
        /// \return 返回弱提示事件
        virtual INotificationEvent* GetNotificationEvent()  = 0;

        /// \brief 获取弱提示事件
        /// \return 返回弱提示事件
        virtual const INotificationEvent* GetNotificationEvent() const = 0;
    };
}

//导出宏改成类级别?

